var form =new Vue({
    el:'#loginForm',
    data:{
        url:'/hr/loginPost',
        form:{
            mobile: '',
            password: ''
        }
    },
    methods:{
        login : function () {
            this.$http.post(this.url, this.form).then((message) => {




                if(message==='0'){
                    layer.msg('您的账号或密码输入错误！！！');
                }else {
                    layer.msg('登录成功，3S后跳转！');
                    setTimeout(function(){
                        self.location='/';
                    },3000);
                }
            }).
            catch((message) => {
                layer.msg('登录出了点小错误哦！！！');
            });
        }
    }
});